package com.cdn.log.config;


import com.cdn.log.interceptor.ClogInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 蔡定努
 *  2024/06/03
 */
@ConditionalOnClass(org.springframework.web.servlet.config.annotation.WebMvcConfigurer.class)
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ClogInterceptor()).addPathPatterns("/**");
    }
}
